from day01.basecla import BaseClass
from day01.basecla import driver
from selenium.webdriver.common.by import By
from time import sleep
c=BaseClass()
c.open_browser('http://sahitest.com/demo/')
mylinktext=driver.find_element(By.LINK_TEXT,'Link Test')
print('click',mylinktext.text)
mylinktext.click()
sleep(2)
mycontent=driver.find_element(By.LINK_TEXT,'linkByContent')
print('click',mycontent.text)
mycontent.click()
sleep(2)
myback=driver.find_element(By.LINK_TEXT,'Back')
myback.click()
sleep(2)
myhtml=driver.find_element(By.LINK_TEXT,'linkByHtml')
print('click',myhtml.text)
myhtml.click()
sleep(2)
driver.back()
sleep(5)
myimg=driver.find_element(By.XPATH,'//img[@id="imageWithOnclickChangingHref"]')
myimg.click()
sleep(2)
c.close_browser()